package _21FileReader写字符数据;

import java.io.FileWriter;
import java.io.IOException;

public class FileWriterDemo {
    public static void main(String[] args) throws IOException {
        FileWriter fileWriter = new FileWriter("D:\\黑马java培训班\\代码\\itcast\\JavaSE\\day10\\abd\\aa\\d.txt");
       //写一个字符
       //fileWriter.write(97);

        //写一个字符数组
//        char[] chars = {'c','中'};
//        fileWriter.write(chars);


        //写一个字符数组的一部分
        char[] chars = {'c','a','j','d','c'};

        fileWriter.write(chars,3,2);



        fileWriter.close();
    }
}
